{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Africa's Talking SMS", "description": "Send and receive SMS from more than 300 million mobile subscribers across Africa.", "contact": { "name": "Advice and answers from the Africa's Talking Team", "url": "https://help.africastalking.com/en/", "email": "smsussd@africastalking.com" } }, "host": "api.africastalking.com", "basePath": "/", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/version1/messaging/bulk": { "post": { "summary": "Send SMS", "description": "Send an SMS to multiple numbers.", "operationId": "SendSms", "parameters": [ { "name": "Accept", "in": "header", "required": true, "type": "string", "default": " application/json", "description": "Accept", "x-ms-visibility": "internal" }, { "name": "body", "in": "body", "schema": { "type": "object", "properties": { "username": { "type": "string", "description": "Your application's username, on Africa's Talking.", "title": "Username", "x-ms-visibility": "important" }, "message": { "type": "string", "description": "The message you'd like to send.", "title": "Message", "x-ms-visibility": "important" }, "phoneNumbers": { "type": "array", "items": { "type": "string", "description": "Phone number (in international format) you'd like to send the message to.", "title": "Phone Number", "x-ms-visibility": "important" }, "description": "phoneNumbers" }, "enqueue": { "type": "boolean", "description": "Send as many messages as possible before waiting for acknowledgement from telcos.", "title": "Enqueue", "enum": [ true, false ], "x-ms-visibility": "advanced" }, "from": { "type": "string", "description": "Your registered short code or alphanumeric; defaults to AFRICASTKNG.", "title": "From", "x-ms-visibility": "advanced" } }, "default": {}, "x-ms-visibility": "important", "required": [ "message", "phoneNumbers", "username" ] }, "required": true, "x-ms-visibility": "important" } ], "responses": { "201": { "description": "201", "schema": { "type": "object", "properties": { "SMSMessageData": { "type": "object", "properties": { "Message": { "type": "string", "description": "Message" }, "Recipients": { "type": "array", "items": { "type": "object", "properties": { "cost": { "type": "string", "description": "cost" }, "messageId": { "type": "string", "description": "messageId" }, "messageParts": { "type": "integer", "format": "int32", "description": "messageParts" }, "number": { "type": "string", "description": "number" }, "status": { "type": "string", "description": "status" }, "statusCode": { "type": "integer", "format": "int32", "description": "statusCode" } } }, "description": "Recipients" } }, "description": "SMSMessageData" } } } } }, "x-ms-visibility": "important" } }, "/version1/messaging": { "get": { "summary": "Fetch inbox", "description": "Fetch messages in your inbox.", "operationId": "FetchInbox", "parameters": [ { "name": "username", "in": "query", "type": "string", "required": true, "description": "Your application's username, on Africa's Talking.", "x-ms-visibility": "important", "x-ms-summary": "Username" }, { "name": "lastReceivedId", "in": "query", "type": "integer", "required": false, "description": "An id of the last message you retrieved.", "x-ms-visibility": "advanced", "format": "int64", "x-ms-summary": "Last received Id" }, { "name": "Accept", "in": "header", "required": true, "type": "string", "default": " application/json", "description": "Accept", "x-ms-visibility": "internal" } ], "responses": { "200": { "description": "200", "schema": { "type": "object", "properties": { "SMSMessageData": { "type": "object", "properties": { "Messages": { "type": "array", "items": {}, "description": "Messages" } }, "description": "SMSMessageData" } } } } }, "x-ms-visibility": "important" } }, "/api/v1/powerapps/{username}/sms/dlr/callback": { "x-ms-notification-content": { "schema": { "type": "object", "properties": {} }, "headers": { "Content-Type": { "description": "Content-Type", "type": "string" } }, "description": "A new delivery report for a message" }, "post": { "responses": { "200": { "description": "Delivery Notification Webhook created successfully" } }, "summary": "When you receive a Delivery Report for a sent message", "description": "Triggered when you receive a Delivery Report for a message initially sent", "operationId": "DlrNotification", "x-ms-visibility": "important", "x-ms-trigger": "single", "parameters": [ { "name": "username", "in": "path", "required": true, "type": "string", "x-ms-visibility": "important", "x-ms-url-encoding": "single", "x-ms-summary": "Username", "description": "Your application's username." }, { "name": "Content-Type", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "url", "x-ms-visibility": "internal", "title": "", "x-ms-notification-url": true } }, "x-ms-visibility": "internal", "required": [ "url" ] }, "x-ms-visibility": "internal" } ] } }, "/api/v1/powerapps/{username}/sms/inbox/callback": { "x-ms-notification-content": { "schema": { "type": "object", "properties": {} }, "description": "A new message in your inbox", "headers": { "Content-Type": { "description": "Content-Type", "type": "string" } } }, "post": { "responses": { "200": { "description": "Inbox Notification Webhook created successfully" } }, "summary": "When you receive a message in your inbox", "description": "Triggered whenever a message is sent to any of your registered shortcodes", "operationId": "InboxNotification", "x-ms-visibility": "important", "x-ms-trigger": "single", "parameters": [ { "name": "username", "in": "path", "required": true, "type": "string", "description": "Your application's username", "x-ms-summary": "Username", "x-ms-visibility": "important", "x-ms-url-encoding": "single" }, { "name": "Content-Type", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "url", "title": "", "x-ms-visibility": "internal", "x-ms-notification-url": true } }, "x-ms-visibility": "internal", "required": [ "url" ] }, "x-ms-visibility": "internal" } ] } }, "/api/v1/powerapps/{username}/sms/optout/callback": { "x-ms-notification-content": { "description": "A bulk sms opt out notification", "schema": { "type": "object", "properties": {} }, "headers": { "Content-Type": { "description": "Content-Type", "type": "string" } } }, "post": { "responses": { "200": { "description": "BulkSMS Optout Webhook created successfully" } }, "summary": "When a number opts out of receiving your bulk messages", "description": "Triggered whenever a user opts out of receiving messages from your alphanumeric sender ID", "operationId": "BulkSMSOptOutNotification", "x-ms-visibility": "important", "x-ms-trigger": "single", "parameters": [ { "name": "username", "in": "path", "required": true, "type": "string", "x-ms-visibility": "important", "x-ms-summary": "Username", "description": "Your Application's username", "x-ms-url-encoding": "single" }, { "name": "Content-Type", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "url", "title": "", "x-ms-visibility": "internal", "x-ms-notification-url": true } }, "x-ms-visibility": "internal", "required": [ "url" ] }, "x-ms-visibility": "internal" } ] } } }, "x-ms-connector-metadata": [ { "propertyName": "Website", "propertyValue": "https://africastalking.com/sms" }, { "propertyName": "Privacy policy", "propertyValue": "https://africastalking.com/privacy_policy" }, { "propertyName": "Categories", "propertyValue": "Communication" } ], "definitions": {}, "parameters": {}, "responses": {}, "securityDefinitions": { "API Key": { "type": "apiKey", "in": "header", "name": "apiKey" } }, "security": [ { "API Key": [] } ], "tags": [] }